package com.tpshion.cloud.core.autoconfig.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * minioClient配置类
 */
@ConfigurationProperties("oss.minio")
public class MinioClientProperties {

    /**
     * 是否启用，默认不启用
     */
    private boolean enabled;

    /**
     * minio服务端地址
     */
    private String endpoint;

    /**
     * 访问用户
     */
    private String accesskey;

    /**
     * 访问密码
     */
    private String secretkey;

    /**
     * 存储位置名称
     */
    private String bucketName;

    /**
     * 文件前缀
     */
    private String prefix;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public String getAccesskey() {
        return accesskey;
    }

    public void setAccesskey(String accesskey) {
        this.accesskey = accesskey;
    }

    public String getSecretkey() {
        return secretkey;
    }

    public void setSecretkey(String secretkey) {
        this.secretkey = secretkey;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    @Override
    public String toString() {
        return "MinioClientProperties{" +
                "enabled=" + enabled +
                ", endpoint='" + endpoint + '\'' +
                ", accesskey='" + accesskey + '\'' +
                ", secretkey='" + secretkey + '\'' +
                ", bucketName='" + bucketName + '\'' +
                ", prefix='" + prefix + '\'' +
                '}';
    }
}
